Auto merge of #5314 - matklad:need-more-time, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 7 Apr 2018 14:30:47 +0000 (14:30 +0000)
committerbors <bors@rust-lang.org>
Sat, 7 Apr 2018 14:30:47 +0000 (14:30 +0000)
commite3169e28468dd905896bbc6bd184f8b6e519ea83
tree1e3a85a431ac671c104750794a740d23fcb4a4e7
parente837ce064fcf28d5f739f87376384c18a33c6c69
parent42304b0f067db29a071de11d73f08438a985bd01
Auto merge of #5314 - matklad:need-more-time, r=alexcrichton

Try to measure all time it takes to compile code

As @killercup noticed on IRC, no-op build by Cargo takes as much as 300 ms (on stable, beta and nightly), which seems unreasonable. However, Cargo wrongly reports ` Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs`, and this might be the reason why we haven't noticed this before.

So let's try to measure time slightly better:

```
~/projects/rustraytracer master*
λ time cargo +stable build
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
cargo +stable build  0.16s user 0.02s system 94% cpu 0.195 total

~/projects/rustraytracer master*
λ time $c build # Cargo with this patch applied
    Finished dev [unoptimized + debuginfo] target(s) in 0.31 secs
$c build  0.30s user 0.02s system 96% cpu 0.330 total
```

r? @alexcrichton